package com.ymttest.database.sqlwapper.hunter;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.hunter.HunterRelationTemp;

public class HunterRelationTempWrapper {
	
	SqlManager manager;

    public HunterRelationTempWrapper() {
        manager = new SqlManager("hunter");
    }
    
    @SuppressWarnings("unchecked")
	public HunterRelationTemp selectByPrimaryKey(String weixinId) {
    	
    	HunterRelationTemp hunterRelationTemp = new HunterRelationTemp();
    	List<HunterRelationTemp> result = manager
                .getSelectResults(
                        "com.ymttest.database.mapping.hunter.HunterRelationTempMapper.selectByPrimaryKey",
                        weixinId);
        manager.commit();
        
		if (result.size() > 0) {
			hunterRelationTemp = result.get(0);
		}
		
        return hunterRelationTemp;
    }
    
    public static void main(String[] args) {

    	HunterRelationTempWrapper wrapper = new HunterRelationTempWrapper();
    	System.out.println(wrapper.selectByPrimaryKey("oA7HCt4HVmp6JcMPrcD3k5kLrmfs").getWeixinId());
    }
}
